/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.weso.acota.services;

import org.weso.acota.appserv.SuggestAppServ;
import org.weso.acota.services.to.ListSuggestionsTO;
import org.weso.acota.to.RequestSuggestionTO;

/**
 *
 * @author chema
 */
public class AcotaServiceFacadeImpl implements AcotaServiceFacade {

    private SuggestAppServ suggestAppServ;
    public AcotaServiceFacadeImpl(){
        this.suggestAppServ = new SuggestAppServ();
    }
    public ListSuggestionsTO suggest(RequestSuggestionTO request) {
    	ListSuggestionsTO suggestions = new ListSuggestionsTO();
    	suggestions.setSuggestions(this.suggestAppServ.suggest(request).getLabels());
        return suggestions;
    }
    
	public ListSuggestionsTO suggestPaged(RequestSuggestionTO request,
			int page, int maxRegister) {
		ListSuggestionsTO suggestions = new ListSuggestionsTO();
		suggestions.setSuggestions(this.suggestAppServ.suggestPaged(request, page, maxRegister).getLabels());
		return suggestions;
	}

}
